Skip to main content

Add/Remove Close Friend

POST /close_friends/:username

Description

Adds a user to the authenticated user's close-friends list, or removes them if they are already present.

Request Parameters

Requires Authentication: true

PATH PARAMS

NameTypeRequiredDescription
usernamestringYesTarget username.

Usage Example

await axios.post(
"https://api.daykeeper.app/close_friends/johndoe",
{},
{
headers: {
Authorization: `Bearer ${accessToken}`,
},
}
)

Success Response

{
"message": "You added johndoe to your Close Friends"
}

or

{
"message": "You removed johndoe from your Close Friends"
}

Error Response

CodeDescription
401Missing or invalid access token
404User not found
400You cannot add yourself
500Server error